GXVectorPackageShape
QuickDraw GX sends theGXVectorPackageShape
message to translate a shape into a package that is sent to the printing device. You need to override theGXVectorPackageShape
message to turn a shape into the appropriate pen commands. Your override of theGXVectorPackageShape
message must match the following formal declaration:
OSErr MyVectorPackageShape (gxShape aShape, long penIndex);
aShape
- The shape object to be packaged.
penIndex
- The index of the pen to use to draw the shape.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
The default implementation of theGXRenderPage
message for the vector imaging system sends theGXVectorPackageShape
message to translate a QuickDraw GX shape into a package and send it to a printing device.The default implementation of this message does nothing. Your override needs to convert the shape into a series of pen commands and send those commands to your printing device with the
GXBufferData
orGXWriteData
messages.QuickDraw GX converts high-level shapes such as bitmaps, paths, curves, glyphs, text, and text layout into lower-level vector-type shapes such as polygons, rectangles, and lines. For all shapes, QuickDraw GX color sorts, applies transfer modes if needed, clips them against overlapping shapes, and resolves styles, inks, and transforms. It converts the resultant shape into a lower-level shape, if necessary, and then sends the
GXVectorPackageShape
message.Your override of the
GXVectorPackageShape
message needs to convert the shape sent by QuickDraw GX into a device-specific language such as HPGL. You can also override this message to perform other tasks, such as supporting a preview feature in which data is displayed on the user's screen and written to a file before, or instead of, being sent to the device.SPECIAL CONSIDERATIONS
You never send theGXVectorPackageShape
message yourself.You always totally override the
GXVectorPackageShape
message.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGXRenderPage
message is described on page 4-96.The
GXBufferData
message is described on page 4-139.The
GXWriteData
message is described on page 4-141.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help